package Tween
{
	import Plugin.TweenObjectPlugin;
	import Plugin.TweenPlugin;
	
	import flash.geom.Point;

	public class ScaleTween extends TweenObjectPlugin
	{
		public var lockTo:Point;
		
		public var startScaleX:Number=0;
		public var startScaleY:Number=0;
		
		public var endScaleX:Number=0;
		public var endScaleY:Number=0;
		
		public function ScaleTween()
		{
			super();
		}
		override protected function _update():void
		{
			if(time==0)return;
			
			var scaleX:Number = 0;
			var scaleY:Number = 0;
			scaleX = easeing(time,startScaleX,endScaleX-startScaleX,duration);
			scaleY = easeing(time,startScaleY,endScaleY-startScaleY,duration);
			go.obj.scaleX=scaleX;
			go.obj.scaleY=scaleY;
			if(lockTo)
			{
				go.moveTo(lockTo.x,lockTo.y,handleX,handleY);
			}
		}
	}
}